package com.stnet.service.enterprice.base;

import java.util.Iterator;
import java.util.List;

import com.modules.commons.Pager;
import com.stnet.bases.BaseManagerDaoImpl;
import com.stnet.entity.Standby;

public class StandbyManagerDaoImpl extends BaseManagerDaoImpl implements
		StandbyManagerDao {

	public Pager getStandbyList(int pageSize, int pageNo, String state) {
		Pager pager = standbyDao.getStandbyList(pageSize, pageNo, state);
		Standby standby = null;
		List standbyList = pager.getResultList();
		for(Iterator iterator = standbyList.iterator(); iterator.hasNext();){
			standby = (Standby) iterator.next();
		 }
		return pager;
	}

	public void addStandby(Standby standby) {
		standbyDao.addStandby(standby);
		
	}

	public void update(Standby standby) {
		standbyDao.update(standby);
		
	}

	public Standby getStandbyById(Long id) {
		return standbyDao.getStandbyById(id);
	}

	public void delete(Long id) {
		standbyDao.delete(id);
		
	}
	
	public Standby getFirstEntity(){
		return standbyDao.getFirstEntity();
	}

}
